Conversation
This was noted as a depreciation warning when running tests
Pin theme gem to v1.5
Rails 8 initializes Devise before loading test env
Rails 8 requires explicit pluralization rules for irregular verbs
| @@ -0,0 +1,135 @@ | |||
| <!doctype html> | |||
|
|
|||
| <html lang="en"> | |||
There was a problem hiding this comment.
Best Practice: Page does not contain a level-one heading.
Page should contain a level-one heading.
Details
Page title: "The server cannot process the request due to a client error (400 Bad Request)", Main content: "The server cannot process the request due to a client error. Please check the request and try again."
A level-one heading (<h1> or role='heading' with aria-level='1') helps users understand the page topic and provides a landmark for screen reader navigation. Each page should have at least one level-one heading that describes the main content, typically matching or similar to the page title.
| </body> | ||
| <!doctype html> | ||
|
|
||
| <html lang="en"> |
There was a problem hiding this comment.
Best Practice: Page does not contain a level-one heading.
Page should contain a level-one heading.
Details
Page title: "The page you were looking for doesn't exist (404 Not found)", Main content: "The page you were looking for doesn't exist. You may have mistyped the address or the page may have "
A level-one heading (<h1> or role='heading' with aria-level='1') helps users understand the page topic and provides a landmark for screen reader navigation. Each page should have at least one level-one heading that describes the main content, typically matching or similar to the page title.
| </body> | ||
| <!doctype html> | ||
|
|
||
| <html lang="en"> |
There was a problem hiding this comment.
Best Practice: Page does not contain a level-one heading.
Page should contain a level-one heading.
Details
Page title: "Your browser is not supported (406 Not Acceptable)", Main content: "Your browser is not supported. Please upgrade your browser to continue."
A level-one heading (<h1> or role='heading' with aria-level='1') helps users understand the page topic and provides a landmark for screen reader navigation. Each page should have at least one level-one heading that describes the main content, typically matching or similar to the page title.
| </body> | ||
| <!doctype html> | ||
|
|
||
| <html lang="en"> |
There was a problem hiding this comment.
Best Practice: Page does not contain a level-one heading.
Page should contain a level-one heading.
Details
Page title: "The change you wanted was rejected (422 Unprocessable Entity)", Main content: "The change you wanted was rejected. Maybe you tried to change something you didn't have access to. I"
A level-one heading (<h1> or role='heading' with aria-level='1') helps users understand the page topic and provides a landmark for screen reader navigation. Each page should have at least one level-one heading that describes the main content, typically matching or similar to the page title.
JPrevost
left a comment
There was a problem hiding this comment.
Very minor suggested changes:
Reintroduce:
- config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present?
- production log format stanza
Comment out line for a check we don't need in
- bin/ci
| </title> | ||
| <%= render "stylesheet" %> | ||
| <%= stylesheet_link_tag "administrate", data: { turbo_track: "reload" } %> | ||
| <%= stylesheet_link_tag "administrate/application", data: { turbo_track: "reload" } %> |
There was a problem hiding this comment.
Interesting. So this is how we were able to stop adding this to the precompiled I guess a couple commits back?
There was a problem hiding this comment.
Yeah, propshaft (the Rails 8 pipeline) uses logical paths instead of precompiled.
| # config.require_master_key = true | ||
|
|
||
| # Disable serving static files from `public/`, relying on NGINX/Apache to do so instead. | ||
| config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present? |
There was a problem hiding this comment.
Do we not still need this? I suppose if the default is to serve we don't. I'm not sure how to test in Heroku that the static files from the public directory are being served in this PR build.
We definitely set RAILS_SERVE_STATIC_FILES so I'm reluctant to remove this unless you are 100% confident the new default is to serve them since we don't run behind nginx/httpd so rails has to serve them.
There was a problem hiding this comment.
I don't think we do, but I agree that it's wise to keep it just in case. I'm also not sure how to confirm in the PR build.
| # Do not fall back to assets pipeline if a precompiled asset is missed. | ||
| config.assets.compile = false | ||
| # Cache assets for far-future expiry since they are all digest stamped. | ||
| config.public_file_server.headers = { "cache-control" => "public, max-age=#{1.year.to_i}" } |
There was a problem hiding this comment.
I don't understand how this wasn't set before. 🤷🏻
| # Log to STDOUT by default | ||
| config.logger = ActiveSupport::Logger.new(STDOUT) | ||
| .tap { |logger| logger.formatter = ::Logger::Formatter.new } | ||
| .then { |logger| ActiveSupport::TaggedLogging.new(logger) } |
There was a problem hiding this comment.
I think we want to keep this logging config and remove the new logger statement on line 38. Without it we lose the log level . We can tune a bit more later as we end up sort of double logging timestamps now that I've looked closer at this but for now let's revert this and work towards standardizing our rails apps logging config in the future.
| # application.js, application.css, and all non-JS/CSS in the app/assets | ||
| # folder are already added. | ||
| # Rails.application.config.assets.precompile += %w( admin.js admin.css ) | ||
| Rails.application.config.assets.precompile += %w( administrate.css ) |
There was a problem hiding this comment.
This confused me, but it seems to work so ![]()
There was a problem hiding this comment.
See my comment above about propshaft.
|
|
||
| step "Style: Ruby", "bin/rubocop" | ||
|
|
||
| step "Security: Importmap vulnerability audit", "bin/importmap audit" |
There was a problem hiding this comment.
Since we aren't using import maps, we can comment out this line. We probably also aren't immediately adopting running bin/ci but it probably makes sense to comment this out anyone just in case someone runs it. I commented it out in the timdex upgrade so if nothing else this will be consistent :)
There was a problem hiding this comment.
Will do. I missed that you'd commented it out in the TIMDEX upgrade.
This was completed in separate commits to make individual changes easier to parse. Notable changes that affect ETD:
In order to avoid further convoluting the PR, I've avoided addressing two issues:
ActiveSupport::Multibyte::CharsandString#mb_chars. These should be addressed as part of the Rails 8.2 upgrade.annotatevia theannotaterbgem. Running annotations touched many files. This change will occur in a separate PR.Developer
our guide and
all issues introduced by these changes have been resolved or opened as new
issues (link to those issues in the Pull Request details above)
Code Reviewer
(not just this pull request message)
Requires database migrations?
NO
Includes new or updated dependencies?
YES